package com.pkk.cloud.support.gateway.code;

import com.pkk.components.rpc.enums.CodeEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.springframework.http.HttpStatus;

/**
 * @description: 网关业务返回码
 * @author: peikunkun
 * @create: 2020-03-24 14:22
 **/
@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum GatewayBusinessCode implements CodeEnum<String, String> {


  /**
   * 网关服务业务码
   */
  SERVICE_NO_REGISTER("504", "当前服务未注册，请稍后再重试"),
  SERVICE_NO_START("500", "当前服务未启动，请启动再重试"),
  REQUEST_NO_URL("500", "不支持的接口请求"),
  TOO_MANY_REQUESTS(String.valueOf(HttpStatus.TOO_MANY_REQUESTS.value()), "请求过于频繁");;
  String code;
  String msg;
}
